<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Psa_Plugin_Model</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> Psa_Plugin_Model</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class for plugins type of <em>Psa_Plugin_Model</em>.</p>
<p class="description"><p>Model plugins (classes that extends Psa_Plugin_Model class) are place for logic of your application.  In model you do all calculations, get and store data to a database and all other business (domain) logic  of your application.</p><p>Model classes have methods that are called from controller. You should organize your model methods  into more model classes to be logically grouped. You can also put classes for each group of operations into  different subfolders. Don't make one big model class with all methods your application needs.</p><p>You should put results from model into <a href="../../psa/plugins/Psa_Plugin_Model.html#var$psa_result">psa_result</a> object because model and view communicate through  psa_result object.</p><p>You can write <em>Psa_Plugin_Model</em> plugins by extending this class. Here is an example:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">class&nbsp;</span><span class="src-id">my_plugin&nbsp;</span><span class="src-key">extends&nbsp;</span><a href="../../psa/plugins/Psa_Plugin_Model.html">Psa_Plugin_Model</a><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Maximum&nbsp;number&nbsp;in&nbsp;result&nbsp;from&nbsp;functions&nbsp;below</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><span class="src-var">$max_number&nbsp;</span>=&nbsp;<span class="src-num">150</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Puts&nbsp;even&nbsp;numbers&nbsp;till&nbsp;$to_number&nbsp;in&nbsp;$psa_result&nbsp;object.</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><span class="src-id">even_numbers</span><span class="src-sym">(</span><span class="src-var">$to_number</span><span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0</span><span class="src-sym">;&nbsp;</span><span class="src-var">$i&nbsp;</span>&lt;=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">max_number</span><span class="src-sym">;&nbsp;</span><span class="src-var">$i</span>++<span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$i&nbsp;</span>%&nbsp;<span class="src-num">2&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$return</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$i</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;put&nbsp;results&nbsp;into&nbsp;psa_result&nbsp;object</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">psa_result</span><span class="src-sym">-&gt;</span><span class="src-id">even_numbers&nbsp;</span>=&nbsp;<span class="src-var">$return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../../psa/plugins/Psa_Plugin_View.html">Psa_Plugin_View</a></li>
				<li><span class="field">see:</span> <a href="../../psa/plugins/Psa_Plugin_Controller.html">Psa_Plugin_Controller</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_plugin_classes---Psa_Plugin_Model.class.php.html">/plugin_classes/Psa_Plugin_Model.class.php</a> (line <span class="field"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Model.class.php.html#a68">68</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_After_Group_Create.html">Psa_Plugin_After_Group_Create</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_After_Group_Create</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_After_Group_Delete.html">Psa_Plugin_After_Group_Delete</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_After_Group_Delete</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_After_User_Authorize.html">Psa_Plugin_After_User_Authorize</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_After_User_Authorize</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_After_User_Create.html">Psa_Plugin_After_User_Create</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_After_User_Create</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_After_User_Delete.html">Psa_Plugin_After_User_Delete</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_After_User_Delete</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_Before_Group_Create.html">Psa_Plugin_Before_Group_Create</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_Before_Group_Create</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_Before_Group_Delete.html">Psa_Plugin_Before_Group_Delete</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_Before_Group_Delete</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_Before_User_Create.html">Psa_Plugin_Before_User_Create</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_Before_User_Create</em>.
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/AbstractClass.png"
								 alt="Abstract class"
								 title="Abstract class"
								 style="vertical-align: center"/>
						<a href="../../psa/plugins/Psa_Plugin_Before_User_Delete.html">Psa_Plugin_Before_User_Delete</a>
					</td>
					<td>
											Abstract class for plugins type of <em>Psa_Plugin_Before_User_Delete</em>.
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type"><a href="../../psa/Psa_Pdo.html">Psa_Pdo</a></span>
					<a href="#$psa_database" title="details" class="var-name">$psa_database</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type"><a href="../../psa/Psa_Registry.html">Psa_Registry</a></span>
					<a href="#$psa_registry" title="details" class="var-name">$psa_registry</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type"><a href="../../psa/Psa_Result.html">Psa_Result</a></span>
					<a href="#$psa_result" title="details" class="var-name">$psa_result</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																								<div class="method-definition">
					<img src="../../media/images/Constructor.png" alt=" "/>
											<span class="method-result">Psa_Plugin_Model</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">$psa_result</span>&nbsp;<span class="var-name">0</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$psa_database" id="$psa_database"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type"><a href="../../psa/Psa_Pdo.html">Psa_Pdo</a></span>
			<span class="var-name">$psa_database</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Model.class.php.html#a88">88</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reference to database connect object</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$psa_registry" id="$psa_registry"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type"><a href="../../psa/Psa_Registry.html">Psa_Registry</a></span>
			<span class="var-name">$psa_registry</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Model.class.php.html#a81">81</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reference to registry object</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$psa_result" id="$psa_result"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type"><a href="../../psa/Psa_Result.html">Psa_Result</a></span>
			<span class="var-name">$psa_result</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Model.class.php.html#a74">74</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reference to result object</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_Model.class.php.html#a95">95</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor. Sets the $psa_result member variable.</p>
	
	<div class="method-signature">
		<span class="method-result">Psa_Plugin_Model</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">$psa_result</span>&nbsp;<span class="var-name">0</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$psa_result</span>
				<span class="var-name">0</span><span class="var-description">: reference to global result object</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Thu, 21 Oct 2010 01:40:54 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>